package com.mzj.saas.jobs.bill.repository;

import com.mzj.saas.jobs.bill.entity.SmartLockBle;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface SmartLockBleRepository extends PagingAndSortingRepository<SmartLockBle, Long>, JpaSpecificationExecutor<SmartLockBle> {
    @Transactional
    void deleteByLockAuthId(Long lockAuthId);

    SmartLockBle findByLockAuthId(Long lockAuthId);

    List<SmartLockBle> findByLockId(Long lockId);

    int deleteByLockId(Long lockId);

    SmartLockBle findByLockIdAndFAppUserId(Long lockId, String fAppUserId);
}
